<?php
class Comment extends Model {
	protected $validate = array(
		array('username', 'require', '用户名不能为空'),
		array('email', 'require', 'Email不能为空'),
		array('password', 'require', '密码不能为空'),
	);
	
	public function setTable() {
		$this->table = $this->db->getTable('comment');
	}
	
	public static function getTable() {
		return $this->db->getTable('comment');
	}
	
	public function avatar($size = 32, $rating = 'G') {
		if (isset($this->email)) {
			return Util::avatar($this->email, $size, $rating);
		}
	}

}
?>